package com.test.service.serviceImp;

import com.test.dao.DeptDao;
import com.test.entities.HandDepartments;
import com.test.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author dell
 */
@Service
public class DeptServiceImp implements DeptService {

    @Autowired
    private DeptDao deptDao;

    @Override
    public List<HandDepartments> findAll() {
        return deptDao.findAll();
    }

    @Override
    public HandDepartments findById(Long departmentId) {
        return deptDao.findById(departmentId);
    }

    @Override
    public HandDepartments addDept(HandDepartments departments) {
        return deptDao.addDept(departments);
    }

    @Override
    public void delete(Long departmentId) {
        deptDao.delete(departmentId);
    }
}
